package com.jxc.jxc01.grc.web;

import com.jxc.jxc01.grc.service.IManifestService;
import com.jxc.jxc01.grc.service.impl.IManifestServiceImpl;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(value = "/deletmanifest")
public class DeletManifestServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request,
                           HttpServletResponse response)
            throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        response.setContentType("text/html;charset=utf-8");
        System.out.println("ASDFASD发士大夫");
        int manifest_id = Integer.parseInt(request.getParameter("id"));
        IManifestService manifestService = new IManifestServiceImpl();
        boolean b = manifestService.deleteOneOfInBill(manifest_id);
        if (b) {
            System.out.println("删除成功");
        } else {
            System.out.println("删除失败");
        }
    }
}
